WearableExtender

Wearable extender for notification actions. To add extensions to an action, create a new NotificationCompat.Action.WearableExtender object using the WearableExtender() constructor and apply it to a NotificationCompat.Action.Builder using extend.

NotificationCompat.Action action = new NotificationCompat.Action.Builder(
        R.drawable.archive_all, "Archive all", actionIntent)
        .extend(new NotificationCompat.Action.WearableExtender()
                .setAvailableOffline(false))
.build();

Constructors

Link copied to clipboard
constructor()
Create a NotificationCompat.Action.WearableExtender with default options.
constructor(@NonNull action: NotificationCompat.Action)
Create a NotificationCompat.Action.WearableExtender by reading wearable options present in an existing notification action.

Functions

Link copied to clipboard
Link copied to clipboard
Apply wearable extensions to a notification action that is being built.
Link copied to clipboard
Get the label to display to cancel the action.
Link copied to clipboard
Get the label to display to confirm that the action should be executed.
Link copied to clipboard
Get a hint that this Action should be displayed inline - i.e.
Link copied to clipboard
Get a hint that this Action will launch an Activity directly, telling the platform that it can generate the appropriate transitions
Link copied to clipboard
Get the label to display while the wearable is preparing to automatically execute the action.
Link copied to clipboard
Get whether this action is available when the wearable device is not connected to a companion device.
Link copied to clipboard
Set whether this action is available when the wearable device is not connected to a companion device.
Link copied to clipboard
Set a label to display to cancel the action.
Link copied to clipboard
Set a label to display to confirm that the action should be executed.
Link copied to clipboard
Set a hint that this Action should be displayed inline - i.e.
Link copied to clipboard
Set a hint that this Action will launch an Activity directly, telling the platform that it can generate the appropriate transitions.
Link copied to clipboard
Set a label to display while the wearable is preparing to automatically execute the action.